//向外暴露
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);

import userState from './userState';//引入userState.js
import msgState from './msgState';//引入msgState.js
import getters from './getters';//引入getters.js'
import mutations from './mutations'; //引入mutations.js
import actions from './actions '; //引入mutations.js

export default new Vuex.Store({
      modules: {//数据容器
        user: userState,
        msg:msgState,
      },
      getters,//读取state
      mutations,//改变state
      actions,//异步调用mutations
    });



 